import {
    AxesHelper,
    GridHelper,
    PointLightHelper,
    SpotLightHelper,
    DirectionalLightHelper
} from 'three'
import {
    pointLight,
    spotLight
} from './light'

//创建轴 辅助线
const axesHelper:AxesHelper = new AxesHelper(500);
axesHelper.raycast = () => {}

//创建网格 辅助线
const gridHelper: GridHelper = new GridHelper(500,20, 'rgb(200,200,200)', 'rgb(100,100,100)');
// console.log(gridHelper)
//重置gridHelper 上的raycast方法, 这样就不会被射线捕获到相交, 而被射线 拾取器拾取
gridHelper.raycast = () => {}

//创建点光源 辅助线
const pointLightHelper: PointLightHelper = new PointLightHelper(pointLight, pointLight.distance, pointLight.color)
pointLight.raycast = () => {}

//创建平行光 辅助线
// const directionalLightHelper:DirectionalLightHelper = new DirectionalLightHelper()

//创建聚光灯 辅助线
const spotLightHelper: SpotLightHelper = new SpotLightHelper(spotLight, spotLight.color)
spotLightHelper.raycast = () =>{}
/*聚光灯辅助线的内部指向的是 spotLight的target的世界矩阵, 初始化时, target: wall,内部并未去计算矩阵, 只在renderer执行时才去计算,
此时聚光灯辅助线就一直执行默认的0,0,0
为了让辅助线跟着 聚光灯的方向照射, 需要手动触发wall去计算矩阵数据, 然后辅助线就会更新位置


 */

export default [
    axesHelper,
    gridHelper,
    spotLightHelper,
    // pointLightHelper,
    // directionalLightHelper
]